﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EasyDesktop.Model;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using EasyDesktop.XmlEditor;

namespace EasyDesktop.ViewModel
{
    public class MainWindowViewModel : ViewModelBase
    {
        MainWindowModel mMainWindowModel;
        List<MalveButton> mMalveButtonList;

        public MainWindowViewModel()
        {
            mMainWindowModel = new MainWindowModel();
        }
    
        public WrapPanel MainWindowPanel
        {
            get;    set;
        }

        public void LoadXml()
        {
            XmlReader reader = new XmlReader();
            mMalveButtonList = reader.GetButtonList();

            foreach(var item in mMalveButtonList)
            {
                MainWindowPanel.Children.Add(item.Button);
            }
        }
    }
}
